#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N = 23;
int arr[N];
int n, m;
int main()	
{
	cin >> n >> m;
	vector<int>a;
	for (int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	for (LL i = 2; i <= m; i++) {
		for (int j = 0; j < n; j++) {
			if (i % arr[j] == 0) {
				a.push_back(i);
				continue;
			}
		}
	}
	sort(a.begin(), a.end());
	a.erase(unique(a.begin(), a.end()), a.end());
	cout << a.size() << endl;
	return 0;
}